package com.xbongbong.pro.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;

/**
 * @author feng.zheng
 * @version v1.0
 * @date 2019/5/21 14:02
 * @since v1.0
 */
@Getter
@Setter
public class FormConfigEntity {
    /**
     * 主键id
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 表单id
     */
    private Long formId;
    /**
     * saas标识
     */
    private Integer saasMark;
    /**
     * 业务类型
     */
    private Integer businessType;
    /**
     * 配置
     */
    private String config;
    /**
     * 配置值
     */
    private String configValue;
    /**
     * 创建时间
     */
    private Long addTime;
    /**
     * 更新时间
     */
    private Long updateTime;
    /**
     * 删除标记
     */
    private Integer del;

    /**
     * 设置更新规则中每条规则显示的名称
     */
    private String formName;

    /**
     * 查询到按钮的名称（web页面上显示的名称）
     */
    private String buttonName;

    /**
     * 是否让"新建签到，取其签到时间更新"置灰
     */
    private Boolean isDisabled;


    public FormConfigEntity() {
        this.del = DelEnum.NORMAL.getDel();
        this.addTime = DateTimeUtil.getInt();
        this.updateTime = DateTimeUtil.getInt();
    }

    public FormConfigEntity(String corpid, Long formId, Integer saasMark, Integer businessType, String config, String configValue) {
        this();
        this.corpid = corpid;
        this.formId = formId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.config = config;
        this.configValue = configValue;
    }
}
